package org.ruoyi.common.dhuman.utils.v1.vo;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
import org.ruoyi.common.core.utils.StringUtils;

import java.io.Serializable;

@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class DhumanExpressionVo implements Serializable {
	// 背景
	private String bgUrl;
	private Float bgX;
	private Float bgY;
	private Integer bgW;
	private Integer bgH;

	// ppt
	private String pptUrl;
	private Float pptX;
	private Float pptY;
	private Integer pptW;
	private Integer pptH;

	// 数字人
	private Long dhumanId;
	private String dhumanUrl;
	private Float dhumanX;
	private Float dhumanY;
	private Integer dhumanW;
	private Integer dhumanH;

	// 字幕
	private boolean hasSubtitle;
	private Float subtitleX;
	private Float subtitleY;
	private Integer subtitleW;
	private Integer subtitleH;

	// 延后时长
	private Integer delayedSeconds;

	public boolean hasBackground() {
		if (StringUtils.isNotEmpty(bgUrl) && pptX != null && pptY != null && pptW != null && pptH != null) {
			return true;
		}

		return false;
	}
}
